<template>
	<view class="page" style="position: relative;">
		<view>
			<image :src="config.main" style="width: 100%;display: block;" mode="widthFix"></image>
		</view>
		<image  @click="toAdd" class="btn-go" :src="config.link" mode="aspectFit"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config:{}
			}
		},
		onLoad(e) {


		},
		onShow() {
			
			
			this.$api.config({}, res => {
				if (res.code) {
					this.config=res.data
				}
			})
		},
		methods: {
			toAdd(){
				uni.navigateTo({
					url:'/pages/index/add'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn-go{
		width: 100px;height: 100px;position: fixed;bottom:30px;right: 20px;
	}
/* 大屏幕样式 */
@media (min-width: 768px) {
    .btn-go {
       right:50%;
	   margin-right: -300px;
    }
}
</style>